<html>
<head>
<style>

    #clipped {
        position: absolute;
        left: 0px;
        right: 0px;
        width: 100px;
        height: 100px;
        overflow: hidden;
    }

    #child {
        width: 500px;
        height: 100px;
        background-color: green;
        will-change: transform;
    }

    #overlap {
        position: absolute;
        left: 400px;
        top: 0px;
        width: 100px;
        height: 100px;
        background-color: blue;
    }

    #row1 {
        position: absolute;
        left: 50px;
        top: 50px;
    }

    #row2 {
        position: absolute;
        left: 50px;
        top: 200px;
    }
</style>
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        window.addEventListener('load', function() {
            document.getElementById("layertree").innerText = internals.layerTreeAsText(document);
        }, false);
    }
</script>
</head>
<body>
    <div id="row1">
        <div id="clipped">
            <div id="child"></div>
        </div>

        <!-- this element should not get its own layer -->
        <div id="overlap"></div>
    </div>

    <div id="row2">
        <div id="clipped"></div>
        <div id="child"></div>

        <!-- this element should get its own layer -->
        <div id="overlap"></div>
    </div>

    <pre id="layertree"></pre>
</body>
</html>
